home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 2 #2 / utv2n2s2.d64 / vision times (.txt) < prev    next >
Commodore BASIC  |  2022-08-28  |  8KB  |  235 lines

  1. 1 clr
  2. 10 poke53280,0:poke53281,0:poke 53269,0
  3. 15 a1=1
  4. 20 dims(9),s$(11),se$(11),nu$(10,3)
  5. 100 gosub 4000
  6. 105 gosub10000
  7. 110 gosub21000:gosub 3700
  8. 120 v=6:h=9:tx$="[158][196]o you need a lesson?":gosub 3200
  9. 130 v=8:h=15:tx$="[159]( [217] [159]/ [206] [159])":gosub 3200
  10. 150 pa=1:lo=0:gosub 2100:ifa$="y"ora$="[217]"thengosub20000:goto 160
  11. 151 if a$="n" or a$="[206]" then 160
  12. 152 goto 120
  13. 160 pa=0:gosub5000:ru=1:gosub1000:gosub 3700:if op<>3 then 191
  14. 174 gosub 500:gosub 3700
  15. 191 v=10:tx$="[196]o you want to play again? ":gosub3000
  16. 200 v=12:h=15:tx$="[159]( [217] [159]/ [206] [159])":gosub 3200:lo=0:gosub 2100
  17. 220 ifa$="y"ora$="[217]"then gg=0:nn=0:n=0:g=0:goto 160
  18. 221 if a$="n" or a$="[206]" then 230
  19. 222 goto 191
  20. 230 sys 8*4096+4
  21. 240 stop
  22. 500 v=10:h=0:tx$="[217]ou got"+str$(n)+" right out of"+str$(gg)+" problems"
  23. 501 print chr$(14):gosub3200:v=12:delay=7
  24. 540 tx$="for "+str$(int(((n/gg)*100)+.5))+"%.":gosub 3200:gosub 2000:return
  25. 1000 rem *** central routine ***
  26. 1005 hp=0:mi=0
  27. 1007 print"[147]";chr$(142);
  28. 1010 fori=1tonp
  29. 1020 gosub19000
  30. 1030 gosub3600
  31. 1040 gosub11000:h=0:v=24
  32. 1066 tx$="":gosub3200:print"   <return> to continue, <f8> to exit [146]";:lo=0
  33. 1069 geta$:if a$=chr$(13) then 1075
  34. 1070 if a$=chr$(140) then pa=0:return
  35. 1072 goto 1069
  36. 1075 nexti:pa=0: return
  37. 2000 rem *** timer ***
  38. 2010 ti$="000000"
  39. 2015 geta$:ifa$<>""then2030
  40. 2020 ifti/60<delaythen2015
  41. 2030 return
  42. 2100 rem *** get character ***
  43. 2110 geta$:ifa$=""then2110
  44. 2115 if a$="[140]" then 230
  45. 2120 a=val(a$):ifa<loora>hithen2110
  46. 2130 ifpa=1 then return
  47. 2140 print a$:return
  48. 3000 rem *** center text ***
  49. 3010 ln=len(tx$):h=(40-ln)/2:gosub 3200:return
  50. 3100 v=24:tx$="    <[210][197][212][213][210][206]> to [195]ontinue. [146]":gosub3000:lo=0
  51. 3130 get a$:ifa$=chr$(13) then return
  52. 3140 goto 3130
  53. 3200 rem *** hor/ver tab ***
  54. 3240 print""left$(vt$,v)tab(h);tx$;:return
  55. 3500 rem *** line across screen ***
  56. 3510 print"";:for q=1 to 10
  57. 3530 print"[192][192][192][192]";:next q
  58. 3575 print"";:return
  59. 3600 rem *** print screen header ***
  60. 3610 print"[147]":tx$="vision software presents:":h=10:v=1:gosub 3200
  61. 3660 tx$=t$:print"";:h=10:v=3:gosub 3200:print "";:print:gosub3500:return
  62. 3700 rem *** print screen header ***
  63. 3710 print"[147]"
  64. 3740 h=10:tx$="[214][201][211][201][207][206][160][211][207][198][212][215][193][210][197] and":v=0:gosub 3200
  65. 3750 tx$="[213]p[212]ime [205]agazine [208]resents:":h=10:v=1:gosub 3200
  66. 3760 tx$="[214]ision [212]imes"
  67. 3765 print"[150]";:h=10:v=3:gosub 3200:print"";:print:gosub 3500:return
  68. 4000 rem *** read data ***
  69. 4010 readt$:fori=1to6:read rw$(i):nexti:for i=1to3:readop$(i):nexti
  70. 4070 for i=1 to 4: read co(i):nexti:fori=0to9:forj=1to3:readnu$(i,j):nextj
  71. 4071 next i:fori=1to6:readg$(i):nexti
  72. 4075 vt$=""
  73. 4080 return
  74. 4100 rem *** program data ***
  75. 4110 data"vision times"
  76. 4120 data"great!","fantastic!","super!"
  77. 4130 data"you're really going now!","yes!  yes!  yes!","that's great!"
  78. 4140 data"[211]ee examples done."
  79. 4150 data"[196]o problems with help."
  80. 4160 data"[196]o problems yourself."
  81. 4170 data 30,28,31,158
  82. 4180 data"[213][192][201]","[221] [221]","[202][192][203]"
  83. 4190 data" [174] "," [221] "," [177] "
  84. 4200 data"[213][192][201]","[213][192][203]","[173][192][192]"
  85. 4210 data"[192][192][201]","[192][192][179]","[192][192][203]"
  86. 4220 data"[213] [174]","[173][192][219]","  [177]"
  87. 4230 data"[176][192][201]","[173][192][201]","[192][192][203]"
  88. 4240 data"[213][192] ","[171][192][201]","[202][192][203]"
  89. 4250 data"[176][192][174]"," [213][203]"," [177] "
  90. 4260 data"[213][192][201]","[171][192][179]","[202][192][203]"
  91. 4270 data"[213][192][201]","[202][192][179]","[202][192][203]"
  92. 4280 data"[215]","[209]","[211]","[193]","[218]"," [146]"
  93. 5000 rem *** setup for math ***
  94. 5001 ifru=1then5037
  95. 5010 h=0:v=10:tx$="[159][215]hat's your first name? "
  96. 5020 gosub 3200:mx=16:gosub6000:na$=te$
  97. 5037 v=12:h=0:tx$="[159][215]ould you like to:":gosub 3200:h=7:v=14
  98. 5050 fori=1to3:tx$=str$(i)+". "+op$(i):gosub3200:v=v+1:nexti:h=0:v=v+1
  99. 5090 tx$="[159][217]our choice? (1[159]-3[159]) ":gosub 3200:lo=1:hi=3:gosub 2100:op=a:hi=10
  100. 5130 ifop=1thenhi=5
  101. 5150 v=20:h=0:tx$="[159][200]ow many problems do you want":gosub 3200:
  102. 5170 v=21:tx$="[159]to do? (2 [159]-"+str$(hi)+"[159])   [157][157]"
  103. 5180 gosub 3200:mx=2:gosub 6000:np=val(te$)
  104. 5200 ifnp<2ornp>hithen np=0:goto5170
  105. 5390 return
  106. 6000 te$="":print"[164]";
  107. 6010 get a$:if a$="" then 6010
  108. 6020 if a$=chr$(13) then print"[157] ":return
  109. 6030 if a$=chr$(20) and te$="" then 6010
  110. 6040 if a$=chr$(20) then te$=left$(te$,len(te$)-1):printa$a$"[164]";:goto 6010
  111. 6045 if a$="[140]" then gosub 3700:goto 191
  112. 6050 if len(te$)=mx then 6010
  113. 6060 if a$<" " or a$>"[218]" then 6010
  114. 6070 if a$>"z" and a$<"[193]" then 6010
  115. 6080 if a$=chr$(34) then 6010
  116. 6090 print"[157]"a$"[164]";
  117. 6100 te$=te$+a$:goto 6010
  118. 10000 rem *** do spritey things ***
  119. 10001 for i=704 to 767
  120. 10002 readx:pokei,x
  121. 10003 next
  122. 10004 poke2040,11
  123. 10005 poke53269,peek(53269)or1
  124. 10006 poke53287,2:poke53277,255:poke53271,255
  125. 10007 poke53248,30:poke53249,58
  126. 10008 return
  127. 10009 data252,252,252,121,249,248,51,243,240
  128. 10010 data7,231,224,15,207,192,7,159,128
  129. 10011 data3,63,0,0,126,0,0,252,0
  130. 10012 data0,120,0,0,48,0,0,0,0
  131. 10013 data0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  132. 11000 rem *** see examples ***
  133. 11010 forj=1to3:v=5+j:h=8:tx$=nu$(s(1),j):gosub 3200:nextj
  134. 11060 forj=1to3:v=9 +j:h=8:tx$=nu$(s(2),j):gosub 3200:nextj:v=11:h=6:tx$="[214]"
  135. 11110 gosub3200:v=13:h=6:tx$="[192][192][192][192][192]":gosub 3200:ifop=3 then 17000
  136. 11126 tx$="make"+str$(s(1))+" rows of"+str$(s(2))+" objects.":v=20:h=0
  137. 11127 v=20:h=0:gosub 3200:co=int(rnd(1)*4)+1
  138. 11129 g=int(rnd(1)*6)+1:forj=0tos(1):v=2*j+3+(9-s(1)):h=15+(10-s(2))
  139. 11140 tx$=str$(j):ifj=0thentx$=""
  140. 11155 gosub3200:tx$="":fork=1tos(2)
  141. 11170 :ifj<>0thentx$=tx$+" "+chr$(co(co))+g$(g)+""
  142. 11180 ::ifj=0thentx$=tx$+str$(k)
  143. 11200 nextk:h=17+(10-s(2)):gosub3200:nextj:ifop<>2 then delay=1:gosub 2000
  144. 11220 v=22:h=0:tx$="count the objects to find the product.":gosub 3200
  145. 11231 ifop=2then pa=1:goto11240
  146. 11232 forj=1tos(1):v=2*j+3+(9-s(1)):h=15+(10-s(2))+(s(2)+1)*2:
  147. 11234 :tx$=""+str$(s(2)*j)+"":gosub3200:delay=.5:gosub 3200:delay=.5
  148. 11235 :gosub3200:delay=.5:gosub2000
  149. 11236 gosub2000:nextj:if rev=1 then return
  150. 11240 ifs(3)<10then12000
  151. 11250 delay=1:gosub 2000:v=14:h=4:tx$=str$(int(s(3)/10)):ifop=2 then gosub15000
  152. 11280 forj=1to3:tx$=nu$(int(s(3)/10),j):gosub 3200:v=v+1:nextj
  153. 11990 s(3)=s(3)-int(s(3)/10)*10
  154. 12000 v=14:h=8:tx$=str$(int(s(3))):delay=1:gosub2000:ifop=2 then gosub 15000
  155. 12030 forj=1to3:tx$=nu$(int(s(3)),j):gosub3200:v=v+1:nextj:return
  156. 15000 rem *** examples with help ***
  157. 15010 :v1=v:h1=h:t1$=tx$:s$=tx$:forl=2 to len(s$):v=v1+1:h=h1+l-1:tx$="^"
  158. 15040 :gosub3200:y=0:lo=0:hi=9
  159. 15060 gosub 2100:ifa$=mid$(s$,l,1) then 15150
  160. 15080 :y=y+1:ify<3then15060
  161. 15090 :v=23:tx$="enter a "+mid$(s$,l,1)+" please.[146]":gosub 3000:gosub 3200
  162. 15110 :tx$="                  ":delay=1.5:gosub 2000:gosub 3200:goto15060
  163. 15150 v=v1+1:h=h1+l-1:tx$=" "
  164. 15180 :gosub3200:nextl:v=v1:h=h1:tx$=t$:return
  165. 17000 rem *** do problems ***
  166. 17010 v=16:h=0:tx$="[158]your answer: ":gosub3200:mx=3:gosub6000
  167. 17020 an=val(te$):if an=0 then 17010
  168. 17040 gg=gg+1:ifint(an)=int(s(3))then n=n+1:goto 17120
  169. 17070 v=22:tx$="sorry.  the correct answer is"+str$(s(3))+".":gosub3000:delay=5
  170. 17090 rev=1:gosub 2000:gosub 11126:rev=0:return
  171. 17120 rw=int(rnd(0)*6)+1:forj=1to4:v=20
  172. 17135 :tx$="                                      ":gosub 3000
  173. 17140 v=20:tx$=chr$(co(j))+rw$(rw)+chr$(5):gosub3000:nextj:return
  174. 19000 rem *** math routine ***
  175. 19020 s(1)=int(rnd(1)*6)+1:s(2)=int(rnd(1)*8)+2:s(3)=s(1)*s(2):return
  176. 20000 rem *** info info info ***
  177. 20001 gosub3700:v=6:read nn:for i=1 to nn:readtx$
  178. 20005 iftx$="page"thengosub 3100:gosub 3700:v=6:goto20009
  179. 20006 h=2:ifmid$(tx$,10,1)="[163]"thenv=v+1:gosub3200:goto20009
  180. 20007 if i=8 or i=7 then v=v+1:gosub 3200:goto 20009
  181. 20008 v=v+2:gosub3200
  182. 20009 nexti:return
  183. 20011 data35
  184. 20012 data"[212]his program will help you learn"
  185. 20013 data"your multiplication tables.  [217]ou"
  186. 20014 data"can count objects to find the product."
  187. 20015 data"[212]here are three ways to use the"
  188. 20016 data"program:","    1) [211]ee examples done"
  189. 20017 data"    2) [19